import request from '@/api/axios';
import type { ClientType } from '@/enum'
import type { CustomData, ResultData, Result } from '@/api/types'
import type { BannerItem, SongSheetItem, PrivateContentItem, NewSongItem } from '@/views/base/discover/types'
export const bannerApi = (type: ClientType = 0) => request<CustomData & { banners: BannerItem[] }>({
    url: `/banner?type=${type}`
})

/**
 * @description: 推荐 - 歌单
 */
export const personalizedSongApi = (limit: number = 9) => request<Result<SongSheetItem[]> & { hasTaste: boolean, category: number }>({
    url: `/personalized?limit=${limit}`
})

/**
 * @description: 推荐 -  独家推送
 */
export const privatecontentApi = () => request<Result<PrivateContentItem[]> & { name: string }>({
    url: `/personalized/privatecontent`
})
/**
 * @description: 推荐 - 新音乐
 */
export const newSongApi = (limit: number = 12) => request<Result<NewSongItem[]> & { category: number }>({
    url: `/personalized/newsong?limit=${limit}`
})
/**
 * @description: 推荐 - mv
 */
export const recommendMVApi = () => request<Result<MVItem[]> & { category: number }>({
    url: `/personalized/mv`
})